package demo2;

public class RenTest {
    public static void main(String[] args) {
        LaoShi n1=new LaoShi();
        n1.setName("张老师");
        n1.setAge(30);
//        n1.show();
        xueSheng n2=new xueSheng();
        n2.setName("姜同学");
        n2.setAge(23);
//        n2.show();
        Administrator n3=new Administrator();
        n3.setName("管理员");
        n3.setAge(23);
//        n3.show();
        register(n1);
        register(n2);
        register(n3);
    }
    public static void register(Ren r){
        r.show();
    }

}
